package com.example.finalproject;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void btn(View v){
        if(v.getId()==R.id.start){
            Intent difficulty =new Intent(this,difficulty.class);
            startActivityForResult(difficulty,1); }
        else if(v.getId()==R.id.view){
            Intent view =new Intent(this,view.class);
            startActivityForResult(view,2); }
        else if(v.getId()==R.id.history){
            Intent history =new Intent(this,history.class);
            startActivityForResult(history,3); }
        else{
            System.exit(0);
            finish();
        }
    }
}